package org.locker.domain.bo;

import org.locker.domain.DeviceGrid;
import org.locker.common.mybatis.core.domain.BaseEntity;
import org.locker.common.core.validate.*;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 设备格子信息业务对象 lk_device_grid
 *
 * @author winnie
 * @date 2023-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DeviceGrid.class, reverseConvertGenerate = false)
public class DeviceGridBo extends BaseEntity {

    /**
     * 格子ID
     */
    @NotNull(message = "格子ID不能为空", groups = { EditGroup.class })
    private Long deviceGridId;

    /**
     * 场地ID
     */
    @NotNull(message = "场地ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long positionId;

    /**
     * 场地格子规格
     */
    @NotNull(message = "场地格子规格不能为空", groups = { AddGroup.class, EditGroup.class })
    private String specCode;

    /**
     * 设备ID
     */
    @NotNull(message = "设备ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deviceId;

    /**
     * 主设备编号
     */
    @NotBlank(message = "主设备编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String deviceNo;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 编号
     */
    @NotBlank(message = "编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String number;

    /**
     * 串口编号
     */
    private String serialNo;

    /**
     * 串口索引
     */
    private String serialIndex;

    /**
     * 蓝牙编号
     */
    private String macNo;

    /**
     * 类型：common 常规,screen 屏幕使用,special 特殊用途
     */
    @NotBlank(message = "类型：common 常规,screen 屏幕使用,special 特殊用途不能为空", groups = { AddGroup.class, EditGroup.class })
    private String gridType;

    /**
     * 格子状态：locker 已占用,unlock 未使用
     */
    @NotBlank(message = "格子状态：locker 已占用,unlock 未使用不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 备注
     */
    private String remark;


}
